#include<stdio.h>
#include<string.h>
#include<unistd.h>
#define NUM 101
#define STYLE '='
int main()
{
  char buff[NUM];
  memset (buff,'\0',101);

  const char* s = "|/-\\";
  int i = 0;
  while(i<NUM)
  {
    printf("加载中：[\033[46;31m%-100s\033[0m][%d]%c\r",buff,i,s[i%4]);
    fflush(stdout);
    buff[i++] =STYLE;
    usleep(50000);
  }
  printf("\n");
  return 0;
}
